/**
 * Created by Administrator on 2016/11/30.
 */
$(function () {
    option = {
        title: {
            text: '近七天内销售统计',
             // subtext: '近七天内销售统计'
            //textAlign: center
            textStyle:{
                fontSize: 14,
                fontWeight: '300',
                color: '#333'
            },
            padding:20,
        },
        tooltip: {
            trigger: 'axis'
        },
        // toolbox: {
        //     show: true,
        //     feature: {
        //         mark: {show: true},
        //         restore: {show: true},
        //         saveAsImage: {show: true}
        //     }
        // },
        calculable: true,
        xAxis: [
            {
                type: 'category',
                boundaryGap: false,
                data: ['11/1', '11/2', '11/3', '11/4', '11/5', '11/6', '今日']
            }
        ],
        yAxis: [
            {
                type: 'value',
                // axisLabel: {
                //     formatter: '{value} °C'
                // }
            }
        ],
        series: [
            {
                name: '订单数量',
                type: 'line',
                data: [11, 11, 15, 13, 12, 13, 10],
//                        markPoint: {
//                            data: [
//                                {type: 'max', name: '最大值'},
//                                {type: 'min', name: '最小值'}
//                            ]
//                        },
//                        markLine: {
//                            data: [
//                                {type: 'average', name: '平均值'}
//                            ]
//                        }
            }
        ]
    };
    var e = window.document.getElementById("order_Canves");
    // var data = [12,4,22,45,34,14,25];
    var myChart = echarts.init(e);
    if (option && typeof option === "object") {
        myChart.setOption(option, true);
    }
    return myChart;
});